/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #ffffff;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

header h1 {
    color: #007bff;
    font-size: 2rem;
}

.container {
    display: flex;
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

#chatContainer {
    flex: 3;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    height: calc(100vh - 180px);
}

#chatContainer .messages {
    padding: 20px;
    height: calc(100% - 80px);
    overflow-y: auto;
}

.message-bubble {
    max-width: 80%;
    margin: 15px 0;
    padding: 15px;
    border-radius: 12px;
    word-wrap: break-word;
    position: relative;
}

.user-message {
    background-color: #e3f2fd;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.agent-message {
    background-color: #f5f5f5;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message-bubble::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    z-index: 1;
}

.user-message::after {
    right: -10px;
    top: 15px;
    border-right-color: #e3f2fd;
    border-top-color: #e3f2fd;
    border-bottom-color: #e3f2fd;
}

.agent-message::after {
    left: -10px;
    top: 15px;
    border-left-color: #f5f5f5;
    border-top-color: #f5f5f5;
    border-bottom-color: #f5f5f5;
}

.input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
}

.input-field {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.send-button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.send-button:hover {
    background-color: #0056b3;
}

#controlsContainer {
    flex: 1;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 20px;
    height: calc(100vh - 180px);
    overflow-y: auto;
}

.status-card {
    background-color: #e8f5e8;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.status-text {
    font-weight: bold;
    color: #2e7d32;
}

.controls-section {
    margin-bottom: 20px;
}

.controls-title {
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.control-button {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-button {
    background-color: #2196f3;
    color: white;
}

.clear-button {
    background-color: #6c757d;
    color: white;
}

.exit-button {
    background-color: #dc3545;
    color: white;
}

.control-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.config-section {
    margin-bottom: 20px;
}

.config-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.config-item {
    margin-bottom: 15px;
}

.config-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.config-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    #chatContainer {
        flex: none;
        height: calc(100vh - 200px);
    }
    
    #controlsContainer {
        flex: none;
        height: calc(100vh - 200px);
    }
}